package com.bwie.controller;

import com.bwie.pojo.Result;
import com.bwie.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ 权限
 * @descriptions: MenuController
 * @author: LiYang
 * @date: 2025/3/14 14:59
 * @version: 1.0
 */
@Controller
public class MenuController {
    @Autowired
    private MenuService menuService;

    /**
     * 去页面
     * @return
     */
    @RequestMapping("toMenu")
    public String  toMenu(){
        return "sys/menu";
    }

    /**
     * 权限展示
     * @return
     */
    @RequestMapping("getMenu")
    @ResponseBody
    public Result getMenu(){
        return menuService.getMenu();
    }
}
